import React from 'react';
import './index.css';

class NumberList extends React.Component {
  render() {
    const list = [2, 4, 6, 8, 10];

    const div = <div>a</div>;

    const items = list.forEach((item, index) => {
      const isEven = !!(index % 2);
      const cls = `line ${isEven ? 'line--even' : ''}`;
      return (
        <p key={item} className={cls}>
          {item}
        </p>
      );
    });

    return [<div key="a">{items}</div>, <div key={div}>hello</div>];
  }
}

export default NumberList;
